Computer monitors are often non-interlaced or progressive type display devices, so video images or graphic images must be displayed by sequentially displaying each successive line or pixel data sequentially for a frame of an image. In contrast, interlaced display devices, such as conventional television displays, typically display images using even and odd line interlacing. The process of producing one progressive frame on every incoming interlaced field is called deinterlacing. In other words, deinterlacing is the process of converting a sequence of fields into a sequence of frames.
FIG. 1, for example, shows a first field 102 and a second field 104. The first field 102 contains the odd lines 106 through 110 and the second field 104 contains the even lines 112 through 116. Thus, an interlaced display device would first display the first field 102 and then the second field 104. Fields 102 and 104 are opposite fields, i.e., are of an opposite polarity (odd and even), and furthermore, they are consecutive fields, either forward or backward in time. Also shown in FIG. 1 is a deinterlaced frame 118, i.e., a reconstructed frame 118 having both odd lines 120-124 and even lines 126-130.
Because the sequential fields are different in time, however, creating a frame often requires temporal interpolation, especially when motion exists. Thus, for example, simply using odd lines 106-110 from field 102 and even lines 112-116 from field 104, assuming they are sequential fields, to create deinterlaced frame 118 would be problematic if motion exists.
As known in the art, this field to frame conversion, i.e., deinterlacing, may be done by using various known methods. For example, spatial methods use only the current field and are therefore memory efficient. One example of a spatial method is bobbing, which averages up and down pixels in the current field to interpolate the missing pixels. Thus, for example, if field 102 is the current field being used to construct deinterlaced frame 118, odd line 106 will be used to generate odd line 120, odd line 108 will be used to generate line 122, and line 110 will be used to generate line 124. Then, for example, to generate pixel 132 in even line 126, a missing line for this frame, of the deinterlaced frame 118, the method will average the values of pixel 134 and pixel 136 to produce an interpolated pixel 132.
In the line doubling method of spatial deinterlacing, the previous line in the current field is repeated. Thus, for example, in reconstructed frame 118, even line 126 would be a duplicate of odd line 120.
Bobbing and line doubling, however, may both suffer staircase effects (also known as “shredding”) on areas that feature diagonal lines and edges. (Note, for example, an edge may occur where an abrupt change in pixel values exists.) Therefore, various edge-directional interpolation methods, which are also spatial methods of deinterlacing, exist to reduce or eliminate such adverse affects. Edge directional interpolation (“EDI”) interpolates along the edge or line of the geometry of the current field. One common example of EDI is the edge line adaptive (“EDA”) method. Using this technique, for example, the differences may be examined between two lines next to each other of a field. Interpolation may be done by selecting the two pixels that have the smallest difference and using the average of the two. Thus, the average may be from two pixels that are diagonal to each other, i.e., they are not directly up or down from each other. A more detailed example of an edge directional interpolation method is described in patent application Ser. No. 11/467,978, filed on Aug. 29, 2006 and having inventors Jeff Wei and Marinko Karanovic, which is hereby incorporated by reference in its entirety.
All spatial methods suffer reduced vertical resolution where the lost resolution was present in the missing pixels. This loss of resolution is especially apparent in still areas. When motion exists, the human eye has more difficulty processing all of the detail in motion areas, thereby making this lost resolution less noticeable in motion areas. In still areas, however, the human eye can more readily discern this loss of resolution.
Therefore, motion adaptive methods exist to restore lost resolution in still areas by retrieving (i.e., copying) the missing pixels from the opposite field and by using a spatial method in areas having motion. This technique of inserting an opposite field is effective because if there is not motion, inserting a previous or next field (by definition, of the opposite polarity) will recreate a perfect frame, i.e., there will be no data loss. As noted above, however, this method does not work well when there is motion. Therefore, motion adaptive methods use a spatial method of interpolation in areas, or for pixels, having detected motion.
Various motion detection methods are known to determine whether a missing pixel is still or in motion. In one example, pixels may be compared between one or more different fields to detect motion. In another example, a motion history may be generated. This particular method is detailed, for example, in U.S. Patent Publication No. 2005/0078214, entitled “Method and De-Interlacing Apparatus that Employs Recursively Generated Motion History Maps,” published on Apr. 14, 2005, and having inventors Daniel W. Wong, Philip L. Swan, and Daniel Doswald. This publication is incorporated herein by reference in its entirety.
Thus, by using a motion adaptive method, if a missing pixel is determined to be still, the pixel will be copied from an opposite field; if the missing pixel is determined to be in motion, the pixel will be generated using a spatial method, such as one of the spatial methods discussed above or any other suitable method now known or later developed in the art. For example, with the motion compensated method, interpolation is performed along a motion trajectory. This, however, can be very expensive and has marginal quality improvement over other methods.
One relatively good motion adaptive method is the motion adaptive edge-directional method (“MAED”). This method results in high quality performance because still areas have full resolution and diagonal edges in motion areas are smooth. One known example of an integrated circuit 200 implementing motion adaptive edge-directional deinterlacing is shown in FIG. 2. Integrated circuit 200 may be a pixel shader (e.g., shader) and more specifically a programmable pixel shader, as known in the art. In this example current field data 202, pixels associated with other pixel information 204 (e.g., pixels from other fields or from a motion history map), and pixels from an opposite field 206 go into integrated circuit 200. Within integrated circuit 200, an edge direction interpolator receives current field data 202. Using a known edge directional interpolation method, such as one of the methods discussed above, the edge directional interpolator 208 generates edge directional interpolated information 210. Motion detector 212 may then use current field data 202 and pixels associated with other pixel information 204 (as discussed above) to generate motion detection information 214. Motion detector 212 may use any known method to detect areas of motion between fields, such as those discussed above. Motion detection information 214 indicates areas of motion between different fields, which may then be used to produce better interpolated pixels. Motion adaptive selector 216 then receives the edge directional interpolated information 210 and motion detection information 214, in addition to pixels from an opposite field 206. Then, based on the motion detection information 214, motion adaptive selector 216 generates (or constructs) a deinterlaced frame 218. For example, the motion adaptive selector will select the edge directional interpolated information 210 in areas where the motion detection information 214 indicates motion. Alternatively, if the motion detection information 214 indicates there is not motion, the motion adaptive selector selects pixels from an opposite field 206 to include in those areas of no motion in the deinterlaced frame 218. Thus, integrated circuit 200 implements a conventional method for motion adaptive edge-directional deinterlacing, as known in the art.
Conventional motion adaptive edge-directional deinterlacing methods, however, are not without their problems. For example, known solutions require dedicated hardware, which does not fully leverage the shader (and thus increases the area of silicon). Furthermore, using the shader for the entire motion adaptive edge-directional deinterlacing procedure consumes a lot of power, which is not always doable on low-end graphical processing units (“GPUs”). In some implementations, it requires too many instructions to deinterlace high quality video in real time. Therefore, a need exists for an apparatus and method for deinterlacing interlaced video, and more particularly for implementing motion adaptive edge-directional interpolation for deinterlacing video.